//// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
//
//package com.linqingying.gitcode.pullrequest.action
//
//import com.intellij.icons.AllIcons
//import com.intellij.ide.actions.RefreshAction
//import com.intellij.openapi.actionSystem.AnActionEvent
//import com.linqingying.gitcode.i18n.GitCodeBundle
//import com.linqingying.gitcode.pullrequest.ui.timeline.GCPRTimelineViewModel
//
//class GCPRUpdateTimelineAction
//  : RefreshAction({ GitCodeBundle.message("pull.request.timeline.refresh.action") },
//                  { GitCodeBundle.message("pull.request.timeline.refresh.action.description") },
//                  AllIcons.Actions.Refresh) {
//  override fun update(e: AnActionEvent) {
//    val vm = e.getData(GCPRTimelineViewModel.DATA_KEY)
//    e.presentation.isEnabled = vm != null
//  }
//
//  override fun actionPerformed(e: AnActionEvent) {
//    val model = e.getData(GCPRTimelineViewModel.DATA_KEY) ?: return
//    model.updateAll()
//  }
//}
